package com.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * AccpClasstype entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ACCP_CLASSTYPE", schema = "ACCP")
public class AccpClasstype implements java.io.Serializable {

	// Fields

	private Integer cid;
	private String cname;
	private Set<AccpClass> accpClasses = new HashSet<AccpClass>(0);

	// Constructors

	/** default constructor */
	public AccpClasstype() {
	}

	/** minimal constructor */
	public AccpClasstype(Integer cid) {
		this.cid = cid;
	}

	/** full constructor */
	public AccpClasstype(Integer cid, String cname, Set<AccpClass> accpClasses) {
		this.cid = cid;
		this.cname = cname;
		this.accpClasses = accpClasses;
	}

	// Property accessors
	@Id
	@Column(name = "CID", unique = true, nullable = false, precision = 8, scale = 0)
	public Integer getCid() {
		return this.cid;
	}

	public void setCid(Integer cid) {
		this.cid = cid;
	}

	@Column(name = "CNAME")
	public String getCname() {
		return this.cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "accpClasstype")
	public Set<AccpClass> getAccpClasses() {
		return this.accpClasses;
	}

	public void setAccpClasses(Set<AccpClass> accpClasses) {
		this.accpClasses = accpClasses;
	}

}